package com.aaa.doctor.controller.api;

import com.aaa.doctor.service.CareOrderItemService;
import com.aaa.entity.CareOrderItem;
import com.aaa.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

/**
 * @author MuChengGuo
 * @date 2023/4/3 10:27
 * Description: TODO
 **/
@Api(tags = "前端 - 药用处方详情")
@RestController
@RequestMapping("/doctor/api/careOrderItem")
public class CareOrderItemApiController {

    @Autowired
    private CareOrderItemService careOrderItemService;

    @GetMapping("deleteCareOrderItemById/{itemId}/{amount}")
    @ApiOperation(value = "根据详情ID删除数据库里面的详情【只能删除未支付的】")
    public Result<String> deleteCareOrderItemById(@PathVariable String itemId, @PathVariable BigDecimal amount) {
        return careOrderItemService.deleteCareOrderItemById(itemId, amount);
    }

}
